Correct over-aggressive xstrdup removal.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 12 Feb 2013 01:28:38 +0000 (01:28 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 12 Feb 2013 01:28:38 +0000 (01:28 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4307 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/gbfile.cc

index a021320b5b4aebe7e8cd44b3d9e2d46fa89a9b62..d0abd48cdef23a8729ff4368900ac86327476730 100644 (file)
@@ -1256,7 +1256,7 @@ gbfputpstr(const char* s, gbfile* file)
 int
 gbfputpstr(const QString s, gbfile* file)
 {
-  const char *t = s.toUtf8().data();
+  const char *t = xstrdup(s.toUtf8().data());
   int r = gbfputpstr(t, file);
   xfree(t);
   return r;